﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="smallDeimos.Admin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Admin page</title>
    <link rel="stylesheet" type="text/css" href="SmallDeimos.css" />

    <script type="text/javascript" src="jquery-1.2.6.min.js"></script>

    <script type="text/javascript">
        $().ready(function()
		{
			$("ul#bookmarks li a").click(function()
			{
				$("ul#bookmarks .active").removeClass("active");
				$(this).parent().addClass("active");

				var element_index = $("#bookmarks a").index(this);

				$("#content div:visible").hide();
				$("#content div").eq(element_index).show();

				return false;
			});
		});
    </script>

    <style type="text/css">
        #container
        {
            width: 456px;
            margin: auto;
        }
        ul
        {
            width: 100%;
            border-bottom: 5px solid #376b8a;
            margin-top: 10px;
            overflow: hidden;
        }
        ul li
        {
            background: url(            'butt2.jpg' ) no-repeat;
            width: 76px;
            height: 22px;
            float: left;
            display: block;
            padding-top: 5px;
            text-align: center;
        }
        ul li a
        {
            text-decoration: none;
            color: #000;
        }
        ul li.active
        {
            background: url(            'butt1.jpg' ) no-repeat;
            color: #fff;
        }
        ul li.active a
        {
            color: #fff;
        }
        #bar1, #bar2, #bar3
        {
            color: #fff;
            padding: 10px;
            display: none;
        }
        #bar1
        {
            display: block;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:Label ID="Label1" runat="server" Font-Size="X-Large" Text="Admin panel"></asp:Label>
    <div id="container">
        <ul id="bookmarks">
            <li class="active"><a href="#bar1">Logs</a></li><li><a href="#bar2">Nothing</a></li><li>
                <a href="#bar3">Sql & Game functions</a></li></ul>
        <div id="content">
            <div id="bar1">
                <table border="2" cellspacing="5">
                    <tr>
                        <td>
                            <asp:GridView ID="GridView5" runat="server" AllowPaging="True" AutoGenerateColumns="true" DataSourceID="ObjectDataSource1">
                            </asp:GridView>
                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetData"
                                TypeName="DBAccess.DAL">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="Select * From Logs" Name="query" Type="String" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </td>
                        <td>
                            <asp:GridView ID="GridView6" runat="server" AllowPaging="True" AutoGenerateColumns="true" DataSourceID="ObjectDataSource2">
                            </asp:GridView>
                            <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetData"
                                TypeName="DBAccess.DAL">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="Select * From News" Name="query" Type="String" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="bar2">
            </div>
            <div id="bar3">
                Query<asp:TextBox ID="TextBox3" runat="server" Width="544px"></asp:TextBox>
                <asp:Button ID="Button7" runat="server" OnClick="Button4_Click" Text="Run" />
                <br />
                <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="Restart game"
                    BackColor="#FF0066" BorderColor="Red" BorderStyle="Double" BorderWidth="3px"
                    Height="88px" Width="294px" />
                <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="Create world" />
                <asp:Button ID="Button5" runat="server" Height="26px" OnClick="Button5_Click" Text="Clean db" />
                <br /><br />
                <asp:TextBox ID="TextBox1" runat="server" Width="100px"></asp:TextBox><asp:Button ID="Button1"
                    runat="server" Text="Sent message to all players" 
                    onclick="Button1_Click1" />
            </div>
        </div>
    </div>
    </form>
</body>
</html>
